<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>续费页面</title>
<script type="text/javascript" src="../Public/js/jquery.js"></script>
<script type="text/javascript" src="../Public/js/My97DatePicker/WdatePicker.js"></script>
<script>
money = <?php echo ($data["money"]); ?>;

$().ready(function(){
	$('#inputmonth').change(function(){moneys()})
})

function moneys(){
	month = parseInt($('#inputmonth').val());
	$('#money').val(money * month);
	date = new Date();
	date.setTime(<?php echo ($data["expiration"]); ?>*1000);
	nm = parseInt(date.getMonth());
	date.setMonth(month+nm);
	$('.Wdate').val(date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate());
	
}
function cg(val)
{
	$('#inputmonth').val(val);
	moneys();
}
</script>
</head>
<body>
<div class="body">
<fieldset>
<legend>要续费的信息</legend>
<ul>
<li>网站名称：<?php echo ($data["linkname"]); ?></li>
<li>网址:<?php echo ($data["linkurl"]); ?></li>
<li>所属栏目：<?php echo ($data["classname"]); ?></li>
<li>续费金额:<?php echo ($data["money"]); ?></li>
<li>到期时间:<?php echo (date('Y-m-d',$data["expiration"])); ?></li>
</ul>
</fieldset>
<form action="__ACTION__" method="post">
<input type="hidden" name="renew" />
<input type="hidden" name="id" value="<?php echo ($data["id"]); ?>" />
<input type="hidden" name="m1" value="<?php echo ($data["money"]); ?>" />
<p>续费时间：<input type="radio" name="month" value="1" onclick="cg('1');"/>1个月&nbsp;&nbsp;<input type="radio" name="month" value="3" onclick="cg('3');"/>3个月&nbsp;&nbsp;<input type="radio" name="month" value="6" onclick="cg('6');"/>半年&nbsp;&nbsp; <input type="radio" name="month" value="12" onclick="cg('12');"/>1年 <input type="text" size="2" id="inputmonth" />个月</p> 
<p>续费金额：<input type="text" name="money" id="money"/></p>
<p>续费后到期时间：<input type="text" name="expiration"  onfocus="WdatePicker({minDate:'%y-%M-{%d+1}'})" class="Wdate"/></p>
<p><input type="submit" value="提交" />
</form>

</div>



</body>
</html>